home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7172 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Big and little endians
  5. Date: 16 Feb 96 00:04:20 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.824429060@rscernix>
  8. References: <4fuuqq$fpp@due.unit.no>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <4fuuqq$fpp@due.unit.no> Vidar Moe <vidarm@ibt.unit.no> writes:
  13.  
  14. >What exactly is meant by the terms little-endians and 
  15. >big-endians?
  16.  
  17. A little-endian machine stores the least significant byte of an integer
  18. at the lowest address allocated to that integer and the most significant 
  19. byte at the highest address allocated to that integer.
  20.  
  21. A big-endian machine stores the most significant byte of an integer
  22. at the lowest address allocated to that integer and the least significant
  23. byte at the highest address allocated to that integer.
  24.  
  25. All the intermediate bytes are stored in natural succession.
  26.  
  27. The byte order of floating point values is usually also affected by the
  28. endianness (aka "byte sex") of the processor.
  29.  
  30. Note that there are machines (not very frequent nowadays) which are
  31. neither big nor little-endian (e.g. PDP-11 WRT 32-bit integers).
  32.  
  33. Dan
  34. --
  35. Dan Pop
  36. CERN, CN Division
  37. Email: danpop@mail.cern.ch 
  38. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  39.